package com.party.service;

import com.alibaba.fastjson.JSONObject;
import com.party.common.base.ApiResult;
import com.party.common.entity.MyPage;
import com.party.entity.PbResource;
import com.baomidou.mybatisplus.extension.service.IService;
import com.party.entity.dto.QueryResourceDto;

import java.util.List;

/**
 * <p>
 * 资源 服务类
 * </p>
 *
 * @author ccl
 * @since 2024-10-25
 */
public interface PbResourceService extends IService<PbResource> {

    boolean add(PbResource pbResource);

    boolean edit(PbResource pbResource);

    boolean delete(Long id);

    MyPage<PbResource> queryPage(QueryResourceDto dto);

    PbResource detail(Long id);

    ApiResult synchronous();

    boolean like(Long id, Integer likeCount);

    JSONObject detailWx(Long id, String openId);

    String downloadAndParseEpub(String url);

    boolean upAndDown(Long id);

    MyPage<PbResource> queryAppPage(QueryResourceDto dto);

    boolean recommend(String deviceId,String resourceId);

    List<PbResource> hotRecommend();
}
